<?php

include_once "function_xml_basic.php";
#include_once "function_xml_atom.php";
$root_path = "/MINI/INFO/SYSTEMINFO";

function GetXmlHostInfo()
{
	global $root_path;
	$query_string = $root_path. "/HOSTINFO";
	$key_array = array("Name", "Company","Desc"); 
	return GetAttributList($query_string, $key_array);
}
#$ret_list = GetXmlHostInfo();
#foreach ($ret_list as $i)
#{
#	print $i['Name']. ':'. $i['Comment'];
#}

function SetXmlHostInfo($in_array)
{
	global $root_path;
	$name = $in_array['Name'];
	$query_string = $root_path. "/HOSTINFO[1]";

	EditAllAttrOfNode($query_string, $in_array);
}

function GetDevIdFromSystem()
{
	$command = "/usr/sbin/serial  | sed 's/Serial Number://g' ";
	$ret = shell_exec($command);
	return $ret;
}

function ApplySetSystemLicense($lic)
{
	$command = '/usr/sbin/license '. $lic. ' 1>/dev/null 2>&1 && /bin/sync ';
	//print $command;
	$ret = shell_exec($command);
	return $ret;
}

function GetDevLicenseFromSystem()
{
	$command = "/bin/cat /etc/.license  ";
	//print $command;
	$ret = shell_exec($command);
	return $ret;
}

?>
